package cn.com.taiji.oospub.wechat.entity;

import cn.com.taiji.entity.StringUUIDEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Calendar;

/**
 * <p>
 * 
 * </p>
 *
 * @author 
 * @since 2020-10-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_system_log")
public class SystemLog extends StringUUIDEntity {

    private static final long serialVersionUID = 1L;

    @TableField("ID")
    private String openId;

    @TableField("INFO")
    private String info;

    @TableField("IP")
    private String ip;

    @TableField("LOG_TYPE")
    private LogType logType;

    @TableField("OPTIME")
    private Calendar optime;

    @TableField("USER_ID")
    private CommonUser userId;

    public enum LogType
    {
        LOGIN("用户登录") {},
        SYSTEM("系统管理") {};
        private String value;

        private LogType(String value)
        {
            this.value = value;
        }

        public String getValue()
        {
            return value;
        }

    }


}
